import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_splash_screen/flutter_splash_screen.dart';
import 'package:secend_flutter/bottom_bar/index_bar_page.dart';
void main() {
    runApp(MyApp());
}
class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  _MyAppState createState() => _MyAppState();
}

final GlobalKey<NavigatorState> navigatorKey =GlobalKey<NavigatorState>();

class _MyAppState extends State<MyApp> {

  
  @override
  Widget build(BuildContext context) {

    return ScreenUtilInit(
      designSize:  const Size(750, 1334),
      minTextAdapt: true,
      splitScreenMode: true,
      builder: (BuildContext context, Widget? child) {
        return MaterialApp(
          navigatorKey:  navigatorKey,
          title: 'Flutter0804',
          debugShowCheckedModeBanner: false,
          theme: ThemeData(
            primarySwatch: Colors.pink,
          ),
          home:IndexBar(),
        );
      },
    );

  }

  @override
  void initState() {
    super.initState();
    hideScreen();
  }

  Future<void> hideScreen() async {
    Future.delayed(Duration(milliseconds: 3600),(){
      FlutterSplashScreen.hide();
    });
  }
}


